package com.mdd.admin.validate.setting;

import com.mdd.common.validator.annotation.IntegerContains;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RechargeConfigValidate implements Serializable {
    private static final long serialVersionUID = 1L;

    public interface update{}

    @NotNull(message = "rechargeOpen参数不能为空")
    @IntegerContains(values = {0, 1}, message = "rechargeOpen参数不在合法值内", groups = { RechargeConfigValidate.update.class })
    private Integer rechargeOpen;

    @NotNull(message = "minRechargeAmount不能为空")
    @DecimalMin(value = "0", message = "minRechargeAmount参数值不能少于0", groups = {RechargeConfigValidate.update.class})
    private BigDecimal minRechargeAmount;
}
